#include<bits/stdc++.h>
using namespace std;
inline int read()
{
    int x=0;char ch=getchar();
    while(!isdigit(ch)) ch=getchar();
    while(isdigit(ch)) x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
    return x;
}
const int N=1e5+10,M=N<<1;
struct ok{
    int x,y,p;
    void init() {x=read(),y=read(),p=read();}
}ask[N];
struct node{
    int x,y;
    bool operator <(const node &A) const{return y<A.y;}
};
int n,m,q,d[N],dis[N];
int first[N],to[M],nxt[M],cnt;
priority_queue<node>Q;
inline void inc(int x,int y) {nxt[++cnt]=first[x],to[cnt]=y,first[x]=cnt;}
inline void Max(int &x,int y) {x=x>y?x:y;}
int main()
{
    freopen("shu.in","r",stdin);
    freopen("shu.out","w",stdout);
    n=read(),m=read(),q=read();
    for(int i=1,u,v;i<n;i++)
        u=read(),v=read(),inc(u,v),inc(v,u);
    for(int i=1;i<=q;i++) ask[i].init();
    for(int i=1,x,y;i<=m;i++)
        x=read(),y=read(),Max(d[x],y);
    for(int i=1;i<=q;i++)
    {
        for(int j=1;j<=n;j++) dis[j]=-1;
        dis[ask[i].x]=max(d[ask[i].x],ask[i].p);
        Q.push((node){ask[i].x,dis[ask[i].x]});
        while(!Q.empty())
        {
            int x=Q.top().x,y=Q.top().y;
            Q.pop();
            if(!y||y!=dis[x]) continue;
            for(int j=first[x],v;j;j=nxt[j])
                if(dis[v=to[j]]<dis[x]-1)
                    dis[v]=dis[x]-1,Max(dis[v],d[v]),Q.push((node){v,dis[v]});
        }
        puts(~dis[ask[i].y]?"YES":"NO");
    }
    return 0;
}